from django.db import models
from django.contrib.auth.models import User

# Create your models here.
class UserProfile(models.Model):
    first_name = models.CharField(max_length=50)
    second_name = models.CharField(max_length=50)
    user = models.OneToOneField(User)
    email_address = models.EmailField(max_length=50)
    acc_creation_date = models.DateTimeField('date created')
    def __unicode__(self):
      return '%s %s' % (self.first_name, self.last_name)
class Result(models.Model):
    result_id = models.ForeignKey(User)
    result_title = models.CharField(max_length=200)
    result_description = models.CharField(max_length = 1000)
    result_encoded = models.CharField(max_length=200)
    def __unicode__(self):
      return '%s' % (self.result_title)
